package com.zhong.blog.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zhong.blog.mapper.TagMapper;
import com.zhong.blog.pojo.Tag;
import com.zhong.blog.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TagServiceImpl implements TagService {
    @Autowired
    TagMapper tagMapper;
    @Override
    public Tag selectListById(int id) {
        QueryWrapper<Tag> tagQueryWrapper = new QueryWrapper<>();
        Tag tag = tagMapper.selectById(id);
        return tag;
    }

    @Override
    public List<Tag> selectList() {
        List<Tag> tags = tagMapper.selectList(null);
        return tags;
    }
}
